<%@page language="java" contentType="text/html; charset=utf8" pageEncoding="utf8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf8">
    <title>Documentations</title>
    <link rel="stylesheet" type="text/css" href="<c:url value="/resources/css/tree.css" />"/>
    <script type="text/javascript" src="<c:url value="/resources/scripts/tree.js" />"></script>
</head>
<body>
<h1 style="text-align: center">Monitoring Students Progress</h1>
<a href="<c:url value="/summaryreport"/>">Сводная ведомость</a>
<span>  |  </span><a href="<c:url value="/main"/>">Документация</a>
<span>  |  </span><a href="<c:url value="/documents/uploadworkload"/>">Загрузить нагрузку</a>
<span>  |  </span><a href="<c:url value="/logout"/>">Выход</a>
<div class="tree" onclick="tree_toggle(arguments[0])">
    <ul class="Container">
        <li class="Node IsRoot ExpandClosed">
            <div class="Expand"></div>
            <a class="Content" target="documentsList" href="documents?path=<c:url value="${tree.name}"/>"><c:out
                    value="${tree.name}"/></a>
            <ul class="Container">
                <c:forEach var="sectionNode" items="${tree.directories}">
                    <li class="Node ExpandClosed">
                        <div class="Expand"></div>
                        <a class="Content" target="documentsList"
                           href="documents?path=<c:url value="${tree.name},${sectionNode.name}"/>">
                            <c:out value="${sectionNode.name}"/>
                        </a>
                        <ul class="Container">
                            <c:forEach var="facultyNode" items="${sectionNode.directories}">
                                <li class="Node ExpandClosed">
                                    <div class="Expand"></div>
                                    <a class="Content" target="documentsList"
                                       href="documents?path=<c:url value="${tree.name},${sectionNode.name},${facultyNode.name}"/>">
                                        <c:out value="${facultyNode.name}"/>
                                    </a>
                                    <ul class="Container">
                                        <c:forEach var="groupNode" items="${facultyNode.directories}">
                                            <li class="Node ExpandClosed">
                                                <div class="Expand"></div>
                                                <a class="Content" target="documentsList"
                                                   href="documents?path=<c:url value="${tree.name},${sectionNode.name},${facultyNode.name},${groupNode.name}"/>">
                                                    <c:out value="${groupNode.name}"/>
                                                </a>
                                                <ul class="Container">
                                                    <c:forEach var="studentNode"
                                                               items="${groupNode.directories}">
                                                        <li class="Node ExpandClosed">
                                                            <div class="Expand"></div>
                                                            <a class="Content" target="documentsList"
                                                               href="documents?path=<c:url value="${tree.name},${sectionNode.name},${facultyNode.name},${groupNode.name},${studentNode.name}"/>">
                                                                <c:out value="${studentNode.name}"/>
                                                            </a>
                                                        </li>
                                                    </c:forEach>
                                                </ul>
                                            </li>
                                        </c:forEach>
                                    </ul>
                                </li>
                            </c:forEach>
                        </ul>
                    </li>
                </c:forEach>
            </ul>
        </li>
    </ul>
</div>
<div class="documents">
    <iframe name="documentsList" style="width: 98%; height: 99%; border: 0; /*border: 1px solid #231F20;*/"></iframe>
</div>
</body>
</html>